package inner;
class Outer2{
    int date1=1;
    public static int date2=2;

    public void fun(){
        System.out.println("Outer2");
    }
    static class Inner2{
        int date3=3;
        public int date4=4;

        @Override
        public String toString() {
            return "Inner2{" +
                    "date3=" + date3 +
                    ", date4=" + date4 +
                    '}';
        }

        public void test(){
            Outer2 t=new Outer2();

            System.out.println("Inner2");
            System.out.println(t.date1);
            System.out.println(date2);
            System.out.println(date3);
            System.out.println(date4);
        }

    }
}

public class Test2 {
    public static void main(String[] args) {
        Outer2.Inner2 inner=new Outer2.Inner2();
        System.out.println(inner);





    }
    public static void main1(String[] args) {
        Outer2.Inner2 inner=new Outer2.Inner2();
        new Outer();//匿名对象
        System.out.println(new Outer2().date1);
        System.out.println(new Outer2().date2);
        new Outer(){
            //匿名内部类
        };
    }

}
